Chris Pollett > Old Classses >
CS116b/216

( Print View )

Student Corner:
  [Grades Sec1]
  [Submit Sec1]
  [Class Sign Up Sec1]
  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [Class Protocols]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Midterm]  [Final]

                           












HW#2 --- last modified February 07 2019 04:26:16..

Solution set.

Due date: Mar 3

Files to be submitted:
  Hw1.zip

Purpose: To experiment with quadrics, fractals and creating a project using SDL.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO1 -- Create a program which generates a simple scene in OpenGL made up of polyhedra and quadrics

LO5 -- Be able to code a scene that makes use of a fractal or iterated function system.

Specification:

CS 216 students will do the assignment described below and in addition look up the following papers in the library, read it and write a 1 page summary of what they got out of it.

Ken Perlin. An Image Synthesizer. Computer Graphics. Vol. 19 No. 3. pp. 287--296.

For both CS116B and CS216 students, I would like you to code up a simple SDL project. When compiled, your project should launch a resizable window using SDL. In this window, should appear a unit sphere centered at the origin. The view is looking at the origin from 5 units forward on the z-axis, 2 units up in the y direction. Your sphere should be textured to look cool using a texture that comes from a PNG file (not ppm). Using the `l` and `r` keys causes the viewpoint to move left and or right on the circle of radius 5 at the same height. View your sphere as a kind of jack-in-the-box. Hitting the `p` key repeatedly, scales the `y`-axis of the sphere, making it more and more of an ellipsoid, until when `s_y = 0.5`, it "pops". At this point, a fractal generated plant should appear on top of the sphere. The stem of this plant should make use of a statistically self-similar fractal. Iterated a fixed number of times, at the last step we replace initiator for that step with a flower or nothing with a fixed probability. Hitting the `o` key lets one step backward through the process of popping to the starting configuration. This completes the description.

Point Breakdown

Code contributed to existing project is well-documented and follows the SJSU CS Department guidelines for C++ (Undergrad version). Paper summary (Grad Version)2pt
Initial sphere is drawn (1pt) in an SDL window (1pt)2pts
Texture read from a png file (1pt) and applied to sphere (1pt)2pts
`l`,`r`, `o`, `p` keys operate as described (0.5pts each)2pts
Fractal flower drawn when ellipsoid "pops" (1pt). Has flowers as described (1pt).2pts
Total10pts